import request from '@/utils/request'

// 查询客户列表
export function listClientinfo(query) {
  return request({
    url: '/ClientinfoMain/clientinfo/list',
    method: 'get',
    params: query
  })
}
// 查询下级客户列表
export function listClientinfo1(query) {
  return request({
    url: '/ClientinfoMain/clientinfo/list1',
    method: 'get',
    params: query
  })
}
// 查询客户详细
export function getClientinfo(clId) {
  return request({
    url: '/ClientinfoMain/clientinfo/' + clId,
    method: 'get'
  })
}

// 新增客户
export function addClientinfo(data) {
  return request({
    url: '/ClientinfoMain/clientinfo',
    method: 'post',
    data: data
  })
}

// 修改客户
export function updateClientinfo(data) {
  return request({
    url: '/ClientinfoMain/clientinfo',
    method: 'put',
    data: data
  })
}

// 删除客户
export function delClientinfo(clId) {
  return request({
    url: '/ClientinfoMain/clientinfo/' + clId,
    method: 'delete'
  })
}
